public class Main {
    public static void transform(int[] array) {
        if (array == null) {
            throw new IllegalArgumentException("Array cannot be null");
        }

        for (int i = 0; i < array.length; i++) {
            array[i] = array[i] * 2;
        }
    }

    public static void main(String[] args) {
        int[] originalArray = {1, 2, 3};
        transform(originalArray);

        // 打印修改后的数组
        for (int num : originalArray) {
            System.out.print(num + " ");
        }
        // 输出: 2 4 6
    }

}
